package com.ruoyi.cbs.evaluate.service.impl;

import java.util.List;

import com.ruoyi.cbs.evaluate.domain.EvaluateResult;
import com.ruoyi.cbs.evaluate.mapper.EvaluateResultMapper;
import com.ruoyi.cbs.evaluate.service.IEvaluateResultService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 承包商阶段考核结果Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-11
 */
@Service
public class EvaluateResultServiceImpl implements IEvaluateResultService
{
    @Autowired
    private EvaluateResultMapper evaluateResultMapper;

    /**
     * 查询承包商阶段考核结果
     * 
     * @param id 承包商阶段考核结果主键
     * @return 承包商阶段考核结果
     */
    @Override
    public EvaluateResult selectEvaluateResultById(Long id)
    {
        return evaluateResultMapper.selectEvaluateResultById(id);
    }

    /**
     * 查询承包商阶段考核结果列表
     * 
     * @param evaluateResult 承包商阶段考核结果
     * @return 承包商阶段考核结果
     */
    @Override
    public List<EvaluateResult> selectEvaluateResultList(EvaluateResult evaluateResult)
    {
        return evaluateResultMapper.selectEvaluateResultList(evaluateResult);
    }

    /**
     * 新增承包商阶段考核结果
     * 
     * @param evaluateResult 承包商阶段考核结果
     * @return 结果
     */
    @Override
    public int insertEvaluateResult(EvaluateResult evaluateResult)
    {
        evaluateResult.setCreateTime(DateUtils.getNowDate());
        return evaluateResultMapper.insertEvaluateResult(evaluateResult);
    }

    /**
     * 修改承包商阶段考核结果
     * 
     * @param evaluateResult 承包商阶段考核结果
     * @return 结果
     */
    @Override
    public int updateEvaluateResult(EvaluateResult evaluateResult)
    {
        evaluateResult.setUpdateTime(DateUtils.getNowDate());
        return evaluateResultMapper.updateEvaluateResult(evaluateResult);
    }

    /**
     * 批量删除承包商阶段考核结果
     * 
     * @param ids 需要删除的承包商阶段考核结果主键
     * @return 结果
     */
    @Override
    public int deleteEvaluateResultByIds(Long[] ids)
    {
        return evaluateResultMapper.deleteEvaluateResultByIds(ids);
    }

    /**
     * 删除承包商阶段考核结果信息
     * 
     * @param id 承包商阶段考核结果主键
     * @return 结果
     */
    @Override
    public int deleteEvaluateResultById(Long id)
    {
        return evaluateResultMapper.deleteEvaluateResultById(id);
    }
}
